package com.vishop.services;

import java.util.Collection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.vishop.daos.CategorieDaoImpl;
import com.vishop.models.Categorie;

@Service
public class CategorieServiceImpl implements CategorieService {
 
    @Autowired
    private CategorieDaoImpl categorieDao;
     
    @Transactional
    public int save(Categorie categorie){
   		return categorieDao.save(categorie);
   	}
    
    @Transactional
    public Categorie getById(int id){
    	return categorieDao.getById(id);
    }
    
    @Transactional
    public Collection<Categorie> getAll(){
    	return categorieDao.getAll();
    }  
    
}
